package nc.ui.scm.price;

import java.util.Hashtable;

import nc.ui.trade.bsdelegate.BDBusinessDelegator;
import nc.vo.dm.tranprice.TranPriceB2VO;
import nc.vo.dm.tranprice.TranPriceBVO;
import nc.vo.pub.SuperVO;

public class TranPriceBusinessDelegator extends BDBusinessDelegator{
	public TranPriceBusinessDelegator(){
		super();
	}

	@Override
	public Hashtable loadChildDataAry(String[] tableCodes, String key)
	
			throws Exception {
		
		TranPriceBVO[] b1vos = (TranPriceBVO[]) this.queryByCondition(TranPriceBVO.class,
				"cpricehid='" + key + "' and isnull(dr,0)=0");
		TranPriceB2VO[] b2vos=	(TranPriceB2VO[]) this.queryByCondition(TranPriceB2VO.class,
				"cpricehid='" + key + "' and isnull(dr,0)=0");	
	
		
		Hashtable<String, SuperVO[]> dataH=new Hashtable<String, SuperVO[]>();
		if(b1vos!=null && b1vos.length>0){
			dataH.put(tableCodes[0], b1vos);
		}
		if(b2vos!=null && b2vos.length>0){
			dataH.put(tableCodes[1], b2vos);
		}
		return dataH;
	}
	

}
